/*
 * Copyright (c) 2006, 2022, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

import java.util.Arrays;

/**
 * <p>Project: javase2203 - Arr6
 * <p>Powered by webrx On 2022-07-12 15:41:03
 * <p>Created by IntelliJ IDEA
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class Arr6 {
    public static void main(String[] args) {
        int[] nums = {10, 20, 30, 40, 50, 60};
        for(int t : nums){
            System.out.println(t);
        }

        for(int i=0;i<nums.length;i++){
            System.out.printf("nums[%d] = %d%n",i,nums[i]);
        }

        for(int i=0;i<nums.length;i++){
            System.out.printf("nums[%d] = %d%n",nums.length-1-i,nums[nums.length-1-i]);
        }

        System.out.println(Arrays.toString(nums));

        System.out.println("----------------------------------");
        //lambda 表达式，流技术
        Arrays.stream(nums).forEach(System.out::println);

    }
}
